extend ../common/new-page

block title
	title 分享平台
block aside
	.widget
		h4.title git地址
		.content.community
			p
				a(href='https://github.com/shushanfx/nfile', title='nfile', target='_blank')
						i.fa.fa-comments
						|  nfile
	.widget
		h4.title 文件夹列表
		.content.community
			for item, index in directory
				if item && item.path
					p
						a(href="?path=#{encodeURIComponent(item.path)}", title="上级目录") 返回上级..
				else 
					if typeof(item) === "string" &&  item.lastIndexOf("/") == item.length -1 
						p
							a(href="?path=#{encodeURIComponent(item)}", title="#{item}") #{item}
	.widget
		h4.title 标签云
		.content.tag-cloud
			a(href='#{base}/tag/markdown/') 用户指南
			a(href='#{base}/tag/jquery/') jQuery
			a(href='#{base}/tag/jquery/') Bootstrap
			a(href='#{base}/tag/html/') html
			a(href='#{base}/tag/http/') http
			a(href='#{base}/tag/upload/') 文件上传
			a(href='#{base}/tag/java/') java
			a(href='#{base}/tag/jquery/') python
			a(href='#{base}/tag/javascript/') javascript
			a(href='#{base}/tag/mysql/') MySQL
			a(href='#{base}/tag/promise/') Promise
			a(href='#{base}/tag/nodejs/') Node.js
			a(href='#{base}/tag/theme/') 主题
			a(href='#{base}/tag/nginx/') Nginx
			a(href='#{base}/tag/proxy/') 反向代理
			a(href='#{base}/tag/apache/') Apache
			a(href='#{base}/tag/release/') 新版本发布
			a(href='#{base}/tag-cloud/') ...
block main
	for item, index in list
		article.post
			.post-head
				h1.post-title
					a(href="#{base}#{'/readme/'}#{item.fsPath}",target="#{item.tag == '下载' ? '' : '_blank'}") 
						| #{item.name}
						if item.isNew
							span.label.label-danger(style="font-size: 10px;margin-left: 5px;") 新
				.post-meta
					span.author
						| 格式：#{item.ext}
					span.author
						| 大小：#{item.size}
					| • &nbsp;
					time.post-date #{item.ftime}
			.post-content
				p
					| 文件路径：#{item.fsPath}
					| &nbsp;&nbsp;
					| 修改时间：#{item.mtime}
			.post-permalink
				if item.tag === "下载"
					a.btn.btn-default(href="#{base}#{'/poi/'}#{item.fsPath}",target="_blank",style="margin-right:10px;") 阅读全文
				a.btn.btn-default(href="#{base}#{'/readme/'}#{item.fsPath}",target="#{item.tag == '下载' ? '' : '_blank'}")
					| #{item.tag === "下载" ? "点击下载" : "阅读全文"}
	if pageTotal > 0
		nav.pagination(role='navigation')
			if pageIndex > 1
				a.newer-posts(href='#{base}/list?index=#{1 * pageIndex - 1}&path=#{encodeURIComponent(path)}')
					i.fa.fa-angle-left
			span.page-number 第 #{pageIndex} 页 ⁄ 共 #{pageTotal} 页
			if pageIndex < pageTotal
				a.older-posts(href='#{base}/list?index=#{1 * pageIndex + 1}&path=#{encodeURIComponent(path)}')
					i.fa.fa-angle-right
	else
		article.post
			.post-head
				.post-meta
					span.author 空空如也，快去增加一篇文章吧o(*￣︶￣*)o
block footer
	.col-sm-4
		.widget
			h4.title 最新文章
			.content.recent-post
				for item, index in topList
					.recent-single-post
						a.post-title(href="#{base}#{'/readme/'}#{item.fsPath}",target="#{item.tag == '下载' ? '' : '_blank'}") #{item.fsPath}
						.date #{item.mtime}
	.col-sm-4
		.widget
			h4.title 标签云
			.content.tag-cloud
				a(href='#{base}/tag/help/') 帮助
				a(href='#{base}/tag/release/') 新版本发布
				a(href='#{base}/tag/javascript/') JavaScript
				a(href='#{base}/tag/promise/') Promise
				a(href='#{base}/tag/theme/') 主题
				a(href='#{base}/tag/nodejs/') Node.js
				a(href='#{base}/tag/mysql/') MySQL
				a(href='#{base}/tag/nginx/') Nginx
				a(href='#{base}/tag/ubuntu/') Ubuntu
				a(href='#{base}/tag/markdown/') Markdown
				a(href='#{base}/tag/proxy/') 反向代理
				a(href='#{base}/tag/apache/') Apache
				a(href='#{base}/tag-cloud/') ...
	.col-sm-4
		.widget
			h4.title 合作伙伴
			.content.tag-cloud.friend-links
				a(href='http://www.bootcss.com', title='Bootstrap中文网', onclick="_hmt.push(['_trackEvent', 'link', 'click', 'bootcsscom'])", target='_blank') Bootstrap中文网
				a(href='http://www.bootcdn.cn', title='开放CDN服务', onclick="_hmt.push(['_trackEvent', 'link', 'click', 'bootcdncn'])", target='_blank') 开放CDN服务
				a(href='http://www.gruntjs.net', title='Grunt中文网', onclick="_hmt.push(['_trackEvent', 'link', 'click', 'gruntjsnet'])", target='_blank') Grunt中文网
				a(href='http://www.gulpjs.com.cn/', title='Gulp中文网', onclick="_hmt.push(['_trackEvent', 'link', 'click', 'gulpjscomcn'])", target='_blank') Gulp中文网
				hr
				a(href='http://lodashjs.com/', title='Lodash中文文档', onclick="_hmt.push(['_trackEvent', 'link', 'click', 'lodashjscom'])", target='_blank') Lodash中文文档
				a(href='http://www.jquery123.com/', title='jQuery中文文档', onclick="_hmt.push(['_trackEvent', 'link', 'click', 'jquery123com'])", target='_blank') jQuery中文文档
